package com.atguigu.gmall.product.init;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringApplicationRunListener;
import org.springframework.context.ConfigurableApplicationContext;

@Slf4j
/**
 * @author lfy
 * @Description 项目启动就创建
 * @create 2022-12-06 14:38
 */
public class InitListener implements SpringApplicationRunListener {



    public InitListener(SpringApplication application , String[] args){
        log.info("监听器创建对象 ： application{} args{}",application,args);
        this.application = application;
    }
      SpringApplication application;
    @Override
    public void started(ConfigurableApplicationContext context) {
        log.info("监听到项目started；skuInfoService:{}");
    }

    @Override
    public void starting() {
        log.info("监听到项目starting");
    }

}
